package com.docker.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.docker.dto.UserDTO;
import com.docker.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {


    /**
     * 查询所有用户信息
     * @return
     */
    List<User> getUsers(IPage<User> userIPage);


    //根据用户id查询用户信息
    @Select("select * from User where student_id = #{userId}")
    User getByUserId(String userId);


    void updateById(User user);

    void addUser(User user);

    /**
     * 根据name查找user
     * @param name
     * @return
     */
    List<User> getUserByParam(String name);

    void delUserById(Integer Id);
}
